package com.zhaodi.mybatisflexdemo.controller;

import com.zhaodi.mybatisflexdemo.entity.Result;
import com.zhaodi.mybatisflexdemo.entity.dto.PhoneValidateDto;
import com.zhaodi.mybatisflexdemo.fegin.TestFeign;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName PhoneController
 * @Description TODO
 * @Author 郭敖
 * @Date 2024年10月14日 10:37
 * @Version 1.0
 */
@RestController
@RequestMapping("/phone")
@RequiredArgsConstructor
@Slf4j
public class PhoneController {

    private final TestFeign feign;
    @PostMapping("/save")
    public Result savePhone(@RequestBody PhoneValidateDto phoneValidateDto){
        Result result = feign.sendPhone(phoneValidateDto);
        log.info("result:{}",result);
        return Result.Success();
    }
}


